<%-------------------------------------------------------------------
 * 页面名称：unsPayResponse.jsp
 * 功能描述：网关支付后台相应方式，支付结果页面
 * Action  :
 *
 *-------------------------------------------------------------------
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="struts-html.tld" prefix="html"%>
<%@ taglib uri="struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="struts-logic.tld" prefix="logic"%>
<%@ taglib uri="struts-bean.tld" prefix="bean"%>
<%
	String path = request.getContextPath();
	
	String strBankCode = (String)request.getAttribute("bankCode");
	String content=(String)request.getAttribute("content");

%>
<%if("icbc".equals(strBankCode)) {%>
<logic:present name="unsPayResponse">
	<logic:present name="pageResponse">
		<logic:equal name="pageResponse" value="true">
		<form name="UnsPayResponseForm" action="<bean:write name="unsPayResponse" property="merchantUrl" />" method="post">
		  <input type="hidden" name="merchantId" value="<bean:write name="unsPayResponse" property="accountId" />" />
		  <input type="hidden" name="responseMode" value="<bean:write name="responseMode" />" />
		  <input type="hidden" name="orderId" value="<bean:write name="unsPayResponse" property="orderId" />" />
		  <input type="hidden" name="unsTransId" value="<bean:write name="unsPayResponse" property="unsTransId" />" />
		  <input type="hidden" name="currencyType" value="<bean:write name="unsPayResponse" property="currencyType" />" />
		  <input type="hidden" name="amount" value="<bean:write name="unsPayResponse" property="amount" />" />
		  <input type="hidden" name="returnCode" value="<bean:write name="unsPayResponse" property="returnCode" />" />
		  <input type="hidden" name="returnMessage" value="<bean:write name="unsPayResponse" property="returnMessage" />" />
		  <input type="hidden" name="successful" value="<bean:write name="unsPayResponse" property="successful" />" />
		  <input type="hidden" name="paid" value="<bean:write name="unsPayResponse" property="paid" />" />
		  <input type="hidden" name="bankCode" value="<bean:write name="unsPayResponse" property="bankCode" />" />
		<logic:present name="mac">
		  <input type="hidden" name="mac" value="<bean:write name="mac" />" />
		</logic:present>
		</form>
		<script language="javascript">
			var formObj = document.UnsPayResponseForm;
			if(formObj!=undefined && formObj.action!=""){
				formObj.submit();
			}
		</script>
		</logic:equal>
	</logic:present>
</logic:present>

<%}else {%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META NAME="EBPayPlatform" CONTENT="<%=content%>"/>
<link href="<%=path%>/css/font.css" rel="stylesheet" type="text/css">
<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css">
<link href="<%=path%>/css/newstyle.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=path%>/js/pagetitle.js"></script>
</head>
<body>
<div id="mainFrame">
	<div class="rightSider2">
    <div class="logined_info2"><span class="bluefont18bdrop"><a href="<%=path%>/main.do"><!-- <img src="<%=path%>/images/LOGO-4_a.jpg" border="0" align="absmiddle" />--></a> | 支付结果</span></div>
    <div class="edit_pass">
      <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" class="blueborder">
        <tr>
          <td width="100%"><table width="100%" border="0" align="center" cellpadding="5" cellspacing="1">
              <input type="hidden" name="step" value="1" />
              <tr>
                <td width="26%" height="30" align="right"  bgcolor="#FFFFFF">交易编号：</td>
                <td width="74%" bgcolor="#FFFFFF"><span class="orangefont14b"><bean:write name="unsPayResponse" property="orderId" /></span></td>
              </tr>
              <tr>
                <td height="30" align="right"  bgcolor="#FFFFFF">交易金额：</td>
                <td bgcolor="#FFFFFF"><span id="debitSubAccountBalanceSpan" class="orangefont14b"><bean:write name="unsPayResponse" property="amount" /></span> 元</td>
              </tr>
              <tr>
                <td height="30" colspan="2" align="right"  bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="7" cellspacing="1" bgcolor="#f9e277" style="margin:10px 0;">
                  <tr>
                    <td bgcolor="#FFFFFF">
					<table width="100%" border="0" cellpadding="0" cellspacing="5">
                        <tr>
                          
						  <logic:present name="unsPayResponse">
							<logic:present name="pageResponse">
								<logic:equal name="pageResponse" value="true">
								<form name="UnsPayResponseForm" action="<bean:write name="unsPayResponse" property="merchantUrl" />" method="post">
								  <input type="hidden" name="merchantId" value="<bean:write name="unsPayResponse" property="accountId" />" />
								  <input type="hidden" name="responseMode" value="<bean:write name="responseMode" />" />
								  <input type="hidden" name="orderId" value="<bean:write name="unsPayResponse" property="orderId" />" />
								  <input type="hidden" name="unsTransId" value="<bean:write name="unsPayResponse" property="unsTransId" />" />
								  <input type="hidden" name="currencyType" value="<bean:write name="unsPayResponse" property="currencyType" />" />
								  <input type="hidden" name="amount" value="<bean:write name="unsPayResponse" property="amount" />" />
								  <input type="hidden" name="returnCode" value="<bean:write name="unsPayResponse" property="returnCode" />" />
								  <input type="hidden" name="returnMessage" value="<bean:write name="unsPayResponse" property="returnMessage" />" />
								  <input type="hidden" name="successful" value="<bean:write name="unsPayResponse" property="successful" />" />
								  <input type="hidden" name="paid" value="<bean:write name="unsPayResponse" property="paid" />" />
								  <input type="hidden" name="bankCode" value="<bean:write name="unsPayResponse" property="bankCode" />" />
								<logic:present name="mac">
								  <input type="hidden" name="mac" value="<bean:write name="mac" />" />
								</logic:present>
								<logic:present name="sign">
								  <input type="hidden" name="sign" value="<bean:write name="sign" />" />
								</logic:present>
								<logic:present name="sign">
								  <input type="hidden" name="sign" value="<bean:write name="sign" />" />
								</logic:present>
								</form>
								<script language="javascript">
								var formObj = document.UnsPayResponseForm;
								if(formObj!=undefined && formObj.action!=""){
									formObj.submit();
								}
								</script>
								</logic:equal>
							</logic:present>
							<logic:equal name="unsPayResponse" property="successful" value="true">
							<tr>
							  <td width="25%" align="right" valign="top">
								<img src="<%=path%>/images/success_icon.gif" width="60" height="56" border="0" align="absmiddle" />
								</td>
								<td width="75%" align="left" class="orang16b">恭喜，您已支付成功！</td>
							</tr>
							</logic:equal>
							<logic:equal name="unsPayResponse" property="successful" value="false">
							<tr>
								<td width="25%" align="right" valign="top">
								<img src="<%=path%>/images/failure_icon.gif" width="60" height="56" border="0" align="absmiddle" />
								</td>
								<td width="75%" align="left" class="orang16b">支付失败，错误原因如下：<br>
								[<bean:write name="unsPayResponse" property="returnCode" />]<bean:write name="unsPayResponse" property="returnMessage" />
								</td>
							</tr>
							</logic:equal>
						  </logic:present>
						  <logic:notPresent name="unsPayResponse">
							<tr>
								<td width="25%" align="right" valign="top">
								<img src="<%=path%>/images/failure_icon.gif" width="60" height="56" border="0" align="absmiddle" />
								</td>
								<td width="75%" align="left" class="orang16b">
								<logic:present name="org.apache.struts.action.ERROR"><html:errors/></logic:present>
								<logic:notPresent name="org.apache.struts.action.ERROR">系统出现不可预知的错误，可能是后台无法与您所选择的银行建立连接，请稍后重新尝试</logic:notPresent>
								</td>
							</tr>
						  </logic:notPresent>
                        </tr>
                    </table>
					</td>
                  </tr>
                </table></td>
                </tr>
          </table></td>
        </tr>
      </table>
      <div style="clear:both;"></div>
	  <div class="box" id="cont_1" > <br />
          <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1">
          <tr>
            <td height="55" align="center"><input name="button33" type="button" class="button_style" onclick="self.close();" value="关 闭"/></td>
          </tr>
        </table>
      </div>
	</div>
	</div>
</div>
<div style="clear:both;"></div>
<logic:notPresent name="requestErr" >
<jsp:include page="/page/common/bankFramePage/footer.jsp"/>
</logic:notPresent>
</body>
<%}%>